<style>
.txt_view2 {
    border: 1px solid #7F9DB9;
    float: left;
    height: 18px;
    margin-bottom: 8px;
    width: 600px;
}
</style>
<div class="w100p filter">
      <div class="float_left p10l">
      <form id="permission-filter-form" action="<?php echo $this->searchUrl; ?>" method="post">
    <div class="buttons">
        <span style="padding:4px;text-decoration: none;">
          <label style="width:170px;text-decoration: none;"><?php echo $this->translate->_("Search Key");?>:</label>
	      <input name="keyword" id="keyword" value="<?php echo isset($this->keyword)?$this->keyword:''; ?>" class="txt_view" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;
		  <button type="button" onclick="viewall();" style="padding: 1px 10px 2px 3px;float: right;">
                            <img src="<?php echo $this->layoutUrl;?>img/icon-tick.png" alt=""/>
                            <?php echo $this->translate->_("View all");?>
                        </button><button type="submit" style="padding: 1px 10px 2px 3px;float: right;">
                            <img src="<?php echo $this->layoutUrl;?>img/icon-tick.png" alt=""/>
                            <?php echo $this->translate->_("Search");?>
                        </button>
        </span>
    </div>
    </form>
        <div class="cl"></div>
      </div>
      <div class="float_right">

        <div class="float_left button_leftb m10r">
          <div class="button_rightb"><a href="<?php echo $this->baseUrl."admin/translate"; ?>">
                    <?php echo $this->translate->_("Back to list");?>
                </a></div>
        </div>
        <div class="cl"></div>
      </div>
      <div class="cb"></div>
    </div>
    <div id="main">
      <div class="w950 mc bg_table po p15b">
        <div class="top_left"></div>
        <div class="top_right"></div>
        <div class="bottom_left"></div>
        <div class="bottom_right"></div>
        <h3 class="p15t p15l p15b bg_bot"><b><?php echo $this->translate->_("Edit language file")." ".$this->langfile;?></b></h3>
       
     <form id="data-form" onsubmit="return batteryObj.validateForm('data-form');" method="post">
      		<br class="clear" /> <br class="clear" />
 <table cellpadding="0" cellspacing="0">
		<tr>
			<th width="20%" bgcolor="#bebebe">Key</th>
			<th width="80%" bgcolor="#bebebe">Phrase</th>
		</tr>
	<?php $i=1; $isColor = 'bg2';
	if(is_array($this->filecontent))
	{

			$i=0;
			
			while(list($keys,$values) = each($this->filecontent))
			{		
                            if ($isColor== 'bg1') {
                    $isColor = 'bg2';
            } else {
                    $isColor = 'bg1';
            }
			?>	
	
		<tr class="<?php echo $isColor;?>">
			<td><label><?php echo $keys; ?></label></td>
			<td><input name="data[<?php echo $keys; ?>]" value="<?php echo $values; ?>" class="txt_view2" type="text" /></td>
		</tr>
	<?php $i++; }?>

	      <br class="clear" />
		  <tr><td colspan="2">
	      <div  style="float:right;"><b>Total phrases:</b> <?php echo $this->totalitem;?>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<?php echo $this->pagination; ?></div> <br class="clear" /> 
		  </td></tr>
		 </table>

              <br class="clear" />
              <div style="padding-left:400px">
              <div class="button_leftb m3r">
          <div class="button_rightb"><a href="#" onclick="if(batteryObj.validateForm('data-form')) document.forms[1].submit();"><?php echo $this->translate->_("Save");?></a></div>
        </div><div class="button_leftb">
          <div class="button_rightb"><a href="<?php echo $this->url(array("action" => "index")); ?>"><?php echo $this->translate->_("Cancel");?></a></div>
        </div></div>
<br class="clear" /><br class="clear" />
     <?php
	 }
	 else
	 {
	 	echo "<tr><td></td><td></td></tr> </table>";
	 }
	 ?>
	  </form>
	  
      </div>
</div>


<script language="javascript">

function viewall()
{
	jQuery("#keyword").val("");
	jQuery("#permission-filter-form").submit();
}
</script>